<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;

class CreateOrdersTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 * @return void
	 */
	public function up()
	{
		Schema::create('orders', function(Blueprint $table)
		{
			$table->increments('id');
			$table->integer('type')->unsigned()->nullable();
			$table->string('orderType')->nullable();
			$table->string('orderNo')->nullable();
			$table->string('orderFn')->nullable();
			$table->date('orderDate')->nullable();
			$table->string('customerNo')->nullable();
			$table->string('customerFullName')->nullable();
			$table->string('customer')->nullable();
			$table->date('deliveryDate')->nullable();
			$table->integer('goodsId')->nullable();
			$table->string('goodsName')->nullable();
			$table->string('goodsCode')->nullable();
			$table->string('goodsType')->nullable();
			$table->float('output', 10, 0)->unsigned()->nullable();
			$table->float('how', 10, 0)->unsigned()->nullable();
			$table->float('trueOut', 15, 4)->unsigned()->nullable();
			$table->string('trueUnit');
			$table->date('startDate')->nullable();
			$table->date('endDate')->nullable();
			$table->float('alloted', 10, 0)->unsigned()->nullable();
			$table->float('finished', 10, 0)->unsigned()->nullable();
			$table->float('storage', 10, 0)->unsigned()->nullable();
			$table->string('unit')->nullable();
			$table->string('notes')->nullable();
			$table->integer('ordertaskId')->nullable();
			$table->integer('log')->nullable();
			$table->timestamps();
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('orders');
	}

}
